import React from 'react'
import classNames from 'classnames'
import './Icon.less'

const prefixCls = 'zhang-icon'

function Icon(props) {
  const { className, type, ...others } = props
  const cls = classNames({
    [prefixCls]: true,
    [`${prefixCls}-${type}`]: true,
    [className]: className
  })

  return <i {...others} className={cls} />
}

export default Icon
